//
//  PBSearchPriceCell.m
//  PBHomeDemo
//
//  Created by Playboy on 2018/1/10.
//  Copyright © 2018年 tmkj. All rights reserved.
//

#import "PBSearchPriceCell.h"
#import "JLDoubleSlider.h"

@interface PBSearchPriceCell ()

@end

@implementation PBSearchPriceCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    [self configer];
}

- (void)configer {
    _slider = [[JLDoubleSlider alloc]initWithFrame:CGRectMake(30, 0, kScreenWidth-60, 120)];
    _slider.unit = @"￥";
    _slider.minTintColor = [UIColor lightGrayColor];
    _slider.maxTintColor = [UIColor lightGrayColor];
    _slider.mainTintColor = UIColorWithRGB(243,159,13);
    [self.contentView addSubview:_slider];
}

- (void)refreshWithMinPrice:(NSInteger)min MaxPrice:(NSInteger)max reset:(BOOL)reset {
    _slider.minNum = min;
    _slider.maxNum = max;
    _slider.minSlider.frame = CGRectMake(0, 60, 20, 20);
    _slider.maxSlider.frame = CGRectMake(kScreenWidth-60-20, 60, 20, 20);
    _slider.minSliderLine.frame = CGRectMake(10, 69, 0, 2);
    _slider.maxSliderLine.frame = CGRectMake(kScreenWidth-60-10, 69, 0, 2);
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
